home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / cmln0985.arc / RATZXREF.NOT < prev    next >
Text File  |  1986-02-27  |  4KB  |  64 lines

  1. Pascal Cross-Reference Program
  2.  
  3. 1.  This program runs on (and came with) the Univ of Maryland Pascal
  4. compiler for the UNIVAC 1100 series computer.  I put the system up at
  5. our site as a lunch-time project.  I made some extensive changes to the
  6. program to cure some problems and to remove some features I did not
  7. like.  It runs - both well and accurately - and should be easily
  8. modifiable for any Pascal system.  You should note that I retired the
  9. whole system (since it was never intended for production) without
  10. completing planned internal documentation, further clean-up, etc.
  11.  
  12. 2.  Notes:
  13.     a.  Using Sperry terminology, this is a processor, not a program.
  14. The difference is the ability to include a "command line" with the
  15. call to a processor - thus one invokes it as: XREF,opt source  .
  16. Sperry system software automatically opens the "source" and makes
  17. it available to the program - you may need to fiddle with this.
  18.     b.  XREF allows one "option" in the processor call - an "N" will
  19. suppress listing of the source - something I don't find handy (but
  20. didn't get around to removing).  See usage of variable "n-option",
  21. and in particular the statement "n-option := 'N' in options" in the
  22. procedure initialize.  "options" is an automatically defined set
  23. which includes all characters specified as options on the processor
  24. call.  You system may not have this capability, so you probably want
  25. to just change the initialize statement to "n_options := false", or
  26. pull out all related code.
  27.     c.  XREF is written to put generated output straight to a
  28. printer (actually, whatever you have as output).  It is currently
  29. set to use 132-columns.  The source is printed in 88-columns - 80
  30. for the actual source and the other 8-columns for line number, flags
  31. and spacing.  You can change this via constant "line_length".  The
  32. cross-ref portion prints to 132-columns.  It requires 15-columns
  33. for the identifier and spacing, and 6-columns for each reference.
  34. You can change output width by changing constant "long_line" from
  35. 18 to a smaller number.  For example: ( 80 - 15 ) / 6 = 10 refs per
  36. line for 80-column paper.
  37.     d.  XREF accepts an opening comment followed immediately by an
  38. ampersand as a top-of-form command.  It accepts either braces {} or
  39. the standard (* *) for comments.  It also is case-independent.
  40.     e.  Output format:  XREF is a minor "debugger" - while listing the
  41. source, it will flag any comments or strings continued over one line
  42. with a "C" or "S" respectively.  Running XREF before a compile can
  43. point out a forgotten closing comment/quote.  In the cross-ref portion,
  44. it flags declarations with a "*" and assignments (of value) with "=".
  45.     f.  XREF uses 12-char for uniqueness - one can change that via
  46. the constant "id_length" - although I never have, and do not know
  47. of any side-effects of doing it.
  48.     g.  One can easily add/delete reserved words - see the array
  49. "rsvd_wd", the constants "xxx_key", etc.  The "xxx_key" stuff is
  50. a bit excessive - only a few are actually needed for program logic
  51. and thus could be removed, but it makes it easier to add/chg/del
  52. items from the list.
  53.     h.  See constant "hash_max" - this is number of unique identifiers
  54. XREF will handle - the value 1999 was sufficient to cross-ref the
  55. entire compiler !!!!!
  56.     i.  Also note the UNIVAC has a 36-bit word - you may have to (or
  57. want to) fiddle with "fifteen_bit", "three_bit" and the records 
  58. ("item" and "entries") to get this to work (or not eat up space).
  59.  
  60. 3.  Enjoy yourself !!!!  Any comments or questions can be addressed
  61. to me via this BBS.
  62.  
  63.                       John T. Ratzenberger
  64.